using System;
using UnityEngine;

namespace GGPhysics
{
	[Serializable]
	public class SphereShape : Shape
	{
		public float radius;

		public Vector3 position;

		public override float MomentOfInertiaWithoutMass()
		{
			return 2f * radius * radius / 5f;
		}

		public override float SilhouetteArea(Vector3 viewDirection)
		{
			throw new NotImplementedException();
		}

		public override float GetDistanceToSurface(Vector3 hitPoint)
		{
			return radius;
		}

		public override CollisionDetection.AABBBounds GetBounds(PhysicsBody.Transform currentTransform, PhysicsBody.Transform nextTransform)
		{
			return new CollisionDetection.AABBBounds(currentTransform.position, nextTransform.position, radius);
		}
	}
}
